package com.yfp.device.mapper;

import com.yfp.device.domain.WorkOrder;
import com.yfp.device.domain.WorkOrderExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface WorkOrderMapper {
    long countByExample(WorkOrderExample example);

    int deleteByExample(WorkOrderExample example);

    int insert(WorkOrder record);

    int insertSelective(WorkOrder record);

    List<WorkOrder> selectByExample(WorkOrderExample example);

    int updateByExampleSelective(@Param("record") WorkOrder record, @Param("example") WorkOrderExample example);

    int updateByExample(@Param("record") WorkOrder record, @Param("example") WorkOrderExample example);

    WorkOrder selectByOrderSn(@Param("orderSn") String orderSn, @Param("workOrderNo") String workOrderNo);

    WorkOrder selectByOrderDetailId(@Param("orderDetailId") String orderDetailId);

    void updateWorkOrderStatus(@Param("orderDetailId")String orderDetailId,
                               @Param("workerOrderStatus") String workerOrderStatus, @Param("exitCloseTime") String exitCloseTime);

    /**
     * 更新工单
     * @param workOrder
     */
    void updateByOrderDetailId(WorkOrder workOrder);
}